﻿import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;


public class Exercise18 {

	public static void main(String[] args) {
		Date date=new Date();
        SimpleDateFormat formater=new SimpleDateFormat("yyyy-MM-dd");
        System.out.println("当前时间为:"+formater.format(date));
        Calendar c=Calendar.getInstance();
        c.set(2015, 04, 06);
        System.out.println(c.get(Calendar.YEAR)+"年"+c.get(Calendar.MONTH)+"月"
        +c.get(Calendar.DAY_OF_MONTH)+"日是一年中的第"+c.get(Calendar.WEEK_OF_YEAR)+"星期。");
	}

}
